﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <%
        var _page = ViewData["Page"] as PageEntity; %>
    <%=Html.Title("{0} - {1}", _page.Name, ForumContext.Configuration.ForumName)%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%
        Html.RenderPartial("LogOn");

        Html.RenderPartial("Navigation");

    %>
    <div class="white-space">
        <table cellpadding="0" cellspacing="1" width="100%">
            <tr>
                <td class="valign-top width20">
                    <div class="fr-widget">
                        <div class="header">
                            <div class="collapse collapse-close {collapseId:'#collapse_cpanel_1'}">
                            </div>
                            <span style="padding-left: 5px">Control Panel </span>
                        </div>
                        <div id="collapse_cpanel_1">
                            <table cellpadding="0" cellspacing="1" width="100%">
                                <tr>
                                    <td class="table-cell">
                                        <a href="#/Home/" onclick="$.MvcForum.ajaxLoad('/Cpanel/Home','_ControlPanel')">Tóm
                                            lược tài khoản</a>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                    <div class="fr-widget white-space">
                        <div class="header">
                            <div class="collapse collapse-close {collapseId:'#collapse_cpanel_3'}">
                            </div>
                            <div style="padding-left: 5px">
                                Hồ sơ cá nhân
                            </div>
                        </div>
                        <div id="collapse_cpanel_3">
                            <table cellpadding="0" cellspacing="1" width="100%">
                                <tr>
                                    <td class="table-cell">
                                        <a href="#/ChangePassword/" onclick="$.MvcForum.ajaxLoad('/Cpanel/ChangePassword','_ControlPanel')">
                                            Đổi mật khẩu</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="table-cell">
                                        <a href="#/ContactDetails/" onclick="$.MvcForum.ajaxLoad('/Cpanel/ContactDetails','_ControlPanel')">
                                            Thông tin liên hệ</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="table-cell">
                                        <a href="#/EmailSignature/" onclick="$.MvcForum.ajaxLoad('/Cpanel/EmailSignature','_ControlPanel')">
                                            Sửa email, chữ ký</a>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="table-cell">
                                        <a href="#/Avatar/" onclick="$.MvcForum.ajaxLoad('/Cpanel/Avatar','_ControlPanel')">Thay đổi hình đại diện</a>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </td>
                <td class="valign-top" style="padding-left: 10px">
                    <div id="_ControlPanel">
                    </div>
                </td>
            </tr>
        </table>
    </div>
    <script type="text/javascript">

        /*

        $(".menu").delegate("a", "click", function () {
        window.location.hash = $(this).attr("href");
        return false;
        });

        */


        window.Page_Load = function () {
            if (!(window.MF_JS_LOADED)) {
                setTimeout('Page_Load()', 500);
                return;
            }
            var _h = window.location.hash.substring(1);

            if (_h) {

                $.MvcForum.ajaxLoad('/Cpanel' + _h, '_ControlPanel');
            }
            else {

                $.MvcForum.ajaxLoad('/Cpanel/Home', '_ControlPanel');
            }


        };

        Page_Load();

    </script>
</asp:Content>
